#include <iostream>

using namespace std;

int main(){

	int a,b,c,n;
	cin >> n;
	if (n == 1 || n == 2){
		cout << 1;
	}
	else {
		a = 1;
		b = 1;
		c = 0;
		for(int i = 0;i < n-2;i++){
			c = a + b;
			a = b;
			b = c;
			
		}
		cout << b;
	}
	return 0;
}
